package com.yjck.fm.system.dao.handler;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.RowMapper;

import com.yjck.fm.system.bean.Menu;

public class MenuRowHandler implements RowMapper{

	public Object mapRow(ResultSet rs, int arg1) throws SQLException {
		Menu menu = new Menu();
		menu.setId(rs.getInt("id"));
		menu.setDesc(rs.getString("desc"));
		menu.setText(rs.getString("title"));
		menu.setLeaf(rs.getInt("isleaf")==1?true:false);
		menu.setParentId(rs.getInt("parentid"));
		menu.setPath(rs.getString("path"));
		return menu;
	}

}
